const mongoose = require('../db');
const Schema = mongoose.Schema;

const schema = new Schema({
  cartid: { type: String },
  userid: { type: String },
  proid: { type: String }, 
  name: { type: String },
  proimg: { type: String },
  price: { type: Number },
  flag: { type: Number }, // 1被选中 0 未选中
  num: { type: Number }
})

// 生成一个集合 集合名称为 pros
module.exports = mongoose.model('Cart', schema);